const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    proxy: {
      "/api": {
        target: "http://localhost:8080", // 后端接口实际地址
        changeOrigin: true, // 允许跨域
        pathRewrite: { "^/api": "" }, // 去掉/api前缀
      }
    },
  },
  configureWebpack: {
    devtool: "source-map",
  },
});
